<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QxOrm: C:/Dvlp/_Perso/QxOrm/include/QxModelView/QxModel.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_qxorm.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QxOrm
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">C++ Object Relational Mapping library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_qx_model_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">QxModel.h</div>  </div>
</div>
<div class="contents">
<a href="_qx_model_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/****************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">**</span>
<a name="l00003"></a>00003 <span class="comment">** http://www.qxorm.com/</span>
<a name="l00004"></a>00004 <span class="comment">** Copyright (C) 2013 Lionel Marty (contact@qxorm.com)</span>
<a name="l00005"></a>00005 <span class="comment">**</span>
<a name="l00006"></a>00006 <span class="comment">** This file is part of the QxOrm library</span>
<a name="l00007"></a>00007 <span class="comment">**</span>
<a name="l00008"></a>00008 <span class="comment">** This software is provided &#39;as-is&#39;, without any express or implied</span>
<a name="l00009"></a>00009 <span class="comment">** warranty. In no event will the authors be held liable for any</span>
<a name="l00010"></a>00010 <span class="comment">** damages arising from the use of this software</span>
<a name="l00011"></a>00011 <span class="comment">**</span>
<a name="l00012"></a>00012 <span class="comment">** Commercial Usage</span>
<a name="l00013"></a>00013 <span class="comment">** Licensees holding valid commercial QxOrm licenses may use this file in</span>
<a name="l00014"></a>00014 <span class="comment">** accordance with the commercial license agreement provided with the</span>
<a name="l00015"></a>00015 <span class="comment">** Software or, alternatively, in accordance with the terms contained in</span>
<a name="l00016"></a>00016 <span class="comment">** a written agreement between you and Lionel Marty</span>
<a name="l00017"></a>00017 <span class="comment">**</span>
<a name="l00018"></a>00018 <span class="comment">** GNU General Public License Usage</span>
<a name="l00019"></a>00019 <span class="comment">** Alternatively, this file may be used under the terms of the GNU</span>
<a name="l00020"></a>00020 <span class="comment">** General Public License version 3.0 as published by the Free Software</span>
<a name="l00021"></a>00021 <span class="comment">** Foundation and appearing in the file &#39;license.gpl3.txt&#39; included in the</span>
<a name="l00022"></a>00022 <span class="comment">** packaging of this file. Please review the following information to</span>
<a name="l00023"></a>00023 <span class="comment">** ensure the GNU General Public License version 3.0 requirements will be</span>
<a name="l00024"></a>00024 <span class="comment">** met : http://www.gnu.org/copyleft/gpl.html</span>
<a name="l00025"></a>00025 <span class="comment">**</span>
<a name="l00026"></a>00026 <span class="comment">** If you are unsure which license is appropriate for your use, or</span>
<a name="l00027"></a>00027 <span class="comment">** if you have questions regarding the use of this file, please contact :</span>
<a name="l00028"></a>00028 <span class="comment">** contact@qxorm.com</span>
<a name="l00029"></a>00029 <span class="comment">**</span>
<a name="l00030"></a>00030 <span class="comment">****************************************************************************/</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef _QX_MODEL_H_</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define _QX_MODEL_H_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#pragma once</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;<a class="code" href="_ix_model_8h.html" title="Interface to manage Qt model/view architecture with classes registered into QxOrm context (Qt widgets...">QxModelView/IxModel.h</a>&gt;</span>
<a name="l00047"></a>00047 
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;<a class="code" href="_qx_collection_8h.html" title="QxOrm container (keep insertion order + quick access by index + quick access by key)">QxCollection/QxCollection.h</a>&gt;</span>
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;<a class="code" href="_qx_class_8h.html" title="Concrete class registered into QxOrm context.">QxRegister/QxClass.h</a>&gt;</span>
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="preprocessor">#include &lt;<a class="code" href="get__primary__key_8h.html" title="qx::trait::get_primary_key&lt;T&gt;::type : return primary key type of T, by default primary key is long ty...">QxTraits/get_primary_key.h</a>&gt;</span>
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;<a class="code" href="is__qx__registered_8h.html" title="qx::trait::is_qx_registered&lt;T&gt;::value : return true if T is registered into QxOrm context to provide ...">QxTraits/is_qx_registered.h</a>&gt;</span>
<a name="l00054"></a>00054 <span class="preprocessor">#include &lt;<a class="code" href="is__valid__primary__key_8h.html" title="qx::trait::is_valid_primary_key&lt;T&gt;(const T &amp; t) : return true if t can be a valid primary key to be i...">QxTraits/is_valid_primary_key.h</a>&gt;</span>
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="preprocessor">#include &lt;<a class="code" href="_qx_dump_8h.html" title="Dump all classes registered into QxOrm context using XML and JSON serialization engine.">QxSerialize/QxDump.h</a>&gt;</span>
<a name="l00057"></a>00057 <span class="preprocessor">#include &lt;<a class="code" href="_qx_clone_8h.html" title="Clone all classes registered into QxOrm context using QxOrm library serialization engine...">QxSerialize/QxClone.h</a>&gt;</span>
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="_qx_serialize_q_json___qx_collection_8h.html" title="Provide a Qt QJson serialization method (save/load) for type qx::QxCollection&lt;Key, Value&gt;">QxSerialize/QJson/QxSerializeQJson_QxCollection.h</a>&gt;</span>
<a name="l00061"></a>00061 <span class="preprocessor">#include &lt;<a class="code" href="_qx_serialize_q_json_8h.html" title="Provide a serialization engine with Qt QJson classes (this feature requires Qt5)">QxSerialize/QxSerializeQJson.h</a>&gt;</span>
<a name="l00062"></a>00062 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a>00064 <span class="keyword">namespace </span>qx {
<a name="l00065"></a><a class="code" href="namespaceqx_1_1model__view.html">00065</a> <span class="keyword">namespace </span>model_view {
<a name="l00066"></a><a class="code" href="namespaceqx_1_1model__view_1_1detail.html">00066</a> <span class="keyword">namespace </span>detail {
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span><a class="code" href="structqx_1_1model__view_1_1detail_1_1_qx_nested_model.html">QxNestedModel</a>;
<a name="l00069"></a>00069 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span><a class="code" href="structqx_1_1model__view_1_1detail_1_1_qx_nested_model___generic.html">QxNestedModel_Generic</a>;
<a name="l00070"></a>00070 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span><a class="code" href="structqx_1_1model__view_1_1detail_1_1_qx_nested_model___container.html">QxNestedModel_Container</a>;
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 } <span class="comment">// namespace detail</span>
<a name="l00073"></a>00073 } <span class="comment">// namespace model_view</span>
<a name="l00074"></a>00074 } <span class="comment">// namespace qx</span>
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 <span class="keyword">namespace </span>qx {
<a name="l00077"></a>00077 
<a name="l00161"></a>00161 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00162"></a><a class="code" href="classqx_1_1_qx_model.html">00162</a> <span class="keyword">class </span><a class="code" href="classqx_1_1_qx_model.html" title="qx::QxModel&lt;T&gt; : all classes registered into QxOrm context can be used with Qt model/view architectur...">QxModel</a> : <span class="keyword">public</span> qx::<a class="code" href="classqx_1_1_ix_model.html" title="qx::IxModel : interface to manage Qt model/view architecture with classes registered into QxOrm conte...">IxModel</a>
<a name="l00163"></a>00163 {
<a name="l00164"></a>00164 
<a name="l00165"></a><a class="code" href="classqx_1_1_qx_model.html#a13dc1a1761db2fae12be18fc08f0e560">00165</a>    <span class="keyword">friend</span> <span class="keyword">struct </span><a class="code" href="structqx_1_1model__view_1_1detail_1_1_qx_nested_model.html">qx::model_view::detail::QxNestedModel</a>&lt;T&gt;;
<a name="l00166"></a><a class="code" href="classqx_1_1_qx_model.html#a1cf44e137ca9d34536daab5b98889763">00166</a>    <span class="keyword">friend</span> <span class="keyword">struct </span><a class="code" href="structqx_1_1model__view_1_1detail_1_1_qx_nested_model___generic.html">qx::model_view::detail::QxNestedModel_Generic</a>&lt;T&gt;;
<a name="l00167"></a><a class="code" href="classqx_1_1_qx_model.html#aaf73787b2f7d986b534f72cf17628d65">00167</a>    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> U&gt; <span class="keyword">friend</span> <span class="keyword">struct </span><a class="code" href="structqx_1_1model__view_1_1detail_1_1_qx_nested_model___container.html">qx::model_view::detail::QxNestedModel_Container</a>;
<a name="l00168"></a>00168 
<a name="l00169"></a>00169 <span class="keyword">public</span>:
<a name="l00170"></a>00170 
<a name="l00171"></a><a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">00171</a>    <span class="keyword">typedef</span> qx_shared_ptr&lt;T&gt; <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a>;
<a name="l00172"></a><a class="code" href="classqx_1_1_qx_model.html#a2d1a76e9a19ad15e645dbd6605fa7f3f">00172</a>    <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classqx_1_1trait_1_1get__primary__key.html#a11ae75af18e7cc688dd45e73c037dc39">qx::trait::get_primary_key&lt;T&gt;::type</a> <a class="code" href="classqx_1_1_qx_model.html#a2d1a76e9a19ad15e645dbd6605fa7f3f">type_primary_key</a>;
<a name="l00173"></a><a class="code" href="classqx_1_1_qx_model.html#aaaf8416f552f17d358c8ad844bb7e66f">00173</a>    <span class="keyword">typedef</span> <a class="code" href="classqx_1_1_qx_collection.html">qx::QxCollection&lt;type_primary_key, type_ptr&gt;</a> <a class="code" href="classqx_1_1_qx_model.html#aaaf8416f552f17d358c8ad844bb7e66f">type_collection</a>;
<a name="l00174"></a>00174 
<a name="l00175"></a><a class="code" href="classqx_1_1_qx_model.html#a300182d32beae72eb99a1e80f8f27c3daf3099edbe58e32e177628cac6c816e4f">00175</a>    <span class="keyword">enum</span> { <a class="code" href="classqx_1_1_qx_model.html#a300182d32beae72eb99a1e80f8f27c3daf3099edbe58e32e177628cac6c816e4f">qx_is_valid</a> = <a class="code" href="structqx_1_1trait_1_1is__qx__registered.html" title="qx::trait::is_qx_registered&lt;T&gt;::value : return true if T is registered into QxOrm context to provide ...">qx::trait::is_qx_registered&lt;T&gt;::value</a> };
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 <span class="keyword">protected</span>:
<a name="l00178"></a>00178 
<a name="l00179"></a><a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a">00179</a>    <a class="code" href="classqx_1_1_qx_collection.html">type_collection</a> <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>;      
<a name="l00180"></a><a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef">00180</a>    <span class="keywordtype">long</span> <a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef" title="Index to insert manually items to the collection.">m_lManualInsertIndex</a>;    
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 <span class="keyword">public</span>:
<a name="l00183"></a>00183 
<a name="l00184"></a><a class="code" href="classqx_1_1_qx_model.html#a8b67a5b81dc16016cfc55ca143657b0f">00184</a>    <a class="code" href="classqx_1_1_qx_model.html#a8b67a5b81dc16016cfc55ca143657b0f">QxModel</a>(QObject * <a class="code" href="classqx_1_1_ix_model.html#a5b6062f358ef8ffa0c9d11f2b677ca14">parent</a> = 0) : qx::<a class="code" href="classqx_1_1_ix_model.html" title="qx::IxModel : interface to manage Qt model/view architecture with classes registered into QxOrm conte...">IxModel</a>(<a class="code" href="classqx_1_1_ix_model.html#a5b6062f358ef8ffa0c9d11f2b677ca14">parent</a>), <a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef" title="Index to insert manually items to the collection.">m_lManualInsertIndex</a>(0) { <a class="code" href="classqx_1_1_qx_model.html#a4b446341a8433992a8455a93d9e3c4a1">qx::QxModel&lt;T&gt;::init</a>(); }
<a name="l00185"></a><a class="code" href="classqx_1_1_qx_model.html#a383471d700890b1e4bc63369677ea557">00185</a>    <a class="code" href="classqx_1_1_qx_model.html#a383471d700890b1e4bc63369677ea557">QxModel</a>(<a class="code" href="classqx_1_1_ix_model.html" title="qx::IxModel : interface to manage Qt model/view architecture with classes registered into QxOrm conte...">qx::IxModel</a> * other, QObject * <a class="code" href="classqx_1_1_ix_model.html#a5b6062f358ef8ffa0c9d11f2b677ca14">parent</a>) : qx::<a class="code" href="classqx_1_1_ix_model.html" title="qx::IxModel : interface to manage Qt model/view architecture with classes registered into QxOrm conte...">IxModel</a>(parent), <a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef" title="Index to insert manually items to the collection.">m_lManualInsertIndex</a>(0) { <a class="code" href="classqx_1_1_qx_model.html#af92896c3e924842f4c900ac9a0296841">qx::QxModel&lt;T&gt;::initFrom</a>(other); }
<a name="l00186"></a><a class="code" href="classqx_1_1_qx_model.html#a6a66f0323e0f95dd5a900d12d8387fca">00186</a>    <span class="keyword">virtual</span> <a class="code" href="classqx_1_1_qx_model.html#a6a66f0323e0f95dd5a900d12d8387fca">~QxModel</a>() { ; }
<a name="l00187"></a>00187 
<a name="l00188"></a>00188 <span class="keyword">protected</span>:
<a name="l00189"></a>00189 
<a name="l00190"></a><a class="code" href="classqx_1_1_qx_model.html#a4b446341a8433992a8455a93d9e3c4a1">00190</a>    <span class="keywordtype">void</span> <a class="code" href="classqx_1_1_qx_model.html#a4b446341a8433992a8455a93d9e3c4a1">init</a>()
<a name="l00191"></a>00191    {
<a name="l00192"></a>00192       BOOST_STATIC_ASSERT(<a class="code" href="classqx_1_1_qx_model.html#a300182d32beae72eb99a1e80f8f27c3daf3099edbe58e32e177628cac6c816e4f">qx_is_valid</a>);
<a name="l00193"></a>00193       <a class="code" href="classqx_1_1_ix_model.html#a983d071f442c98611ed036a365c8d43d" title="Class introspection registered into QxOrm context associated to the model.">m_pClass</a> = <a class="code" href="classqx_1_1_qx_class.html" title="qx::QxClass&lt;T&gt; : concrete class of type T registered into QxOrm context (this class is a singleton an...">qx::QxClass&lt;T&gt;::getSingleton</a>(); <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(<a class="code" href="classqx_1_1_ix_model.html#a983d071f442c98611ed036a365c8d43d" title="Class introspection registered into QxOrm context associated to the model.">m_pClass</a> != NULL);
<a name="l00194"></a>00194       <a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a> = (<a class="code" href="classqx_1_1_ix_model.html#a983d071f442c98611ed036a365c8d43d" title="Class introspection registered into QxOrm context associated to the model.">m_pClass</a> ? <a class="code" href="classqx_1_1_ix_model.html#a983d071f442c98611ed036a365c8d43d" title="Class introspection registered into QxOrm context associated to the model.">m_pClass</a>-&gt;<a class="code" href="classqx_1_1_ix_class.html#a668a6091e56a8133606e64cba430baa4">getDataMemberX</a>() : NULL); <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(<a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a> != NULL);
<a name="l00195"></a>00195       <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a> = (<a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a> ? <a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#ada28538e61c5fd9bf352abdb325be6b0">getId_WithDaoStrategy</a>() : NULL);
<a name="l00196"></a>00196       <a class="code" href="classqx_1_1_ix_model.html#a7f5497a8bfe46ae0d189a09d063272eb" title="Interface to store a list of items.">m_pCollection</a> = (&amp; <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>);
<a name="l00197"></a>00197       <a class="code" href="classqx_1_1_ix_model.html#aad80903e0e46b6995b42315616a31228">generateRoleNames</a>();
<a name="l00198"></a>00198    }
<a name="l00199"></a>00199 
<a name="l00200"></a><a class="code" href="classqx_1_1_qx_model.html#af92896c3e924842f4c900ac9a0296841">00200</a>    <span class="keywordtype">void</span> <a class="code" href="classqx_1_1_qx_model.html#af92896c3e924842f4c900ac9a0296841">initFrom</a>(<a class="code" href="classqx_1_1_ix_model.html" title="qx::IxModel : interface to manage Qt model/view architecture with classes registered into QxOrm conte...">qx::IxModel</a> * pOther)
<a name="l00201"></a>00201    {
<a name="l00202"></a>00202       <a class="code" href="classqx_1_1_qx_model.html#a4b446341a8433992a8455a93d9e3c4a1">init</a>();
<a name="l00203"></a>00203       <a class="code" href="classqx_1_1_qx_model.html" title="qx::QxModel&lt;T&gt; : all classes registered into QxOrm context can be used with Qt model/view architectur...">qx::QxModel&lt;T&gt;</a> * pOtherWrk = <span class="keyword">static_cast&lt;</span><a class="code" href="classqx_1_1_qx_model.html" title="qx::QxModel&lt;T&gt; : all classes registered into QxOrm context can be used with Qt model/view architectur...">qx::QxModel&lt;T&gt;</a> *<span class="keyword">&gt;</span>(pOther);
<a name="l00204"></a>00204       this-&gt;<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a> = pOtherWrk-&gt;<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>;
<a name="l00205"></a>00205       this-&gt;<a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef" title="Index to insert manually items to the collection.">m_lManualInsertIndex</a> = pOtherWrk-&gt;<a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef" title="Index to insert manually items to the collection.">m_lManualInsertIndex</a>;
<a name="l00206"></a>00206       this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a5704c6a8a5e65c20b14d3f0e129b577c" title="Parent model, NULL if current model is the root model.">m_pParent</a> = pOtherWrk-&gt;<a class="code" href="classqx_1_1_ix_model.html#a5704c6a8a5e65c20b14d3f0e129b577c" title="Parent model, NULL if current model is the root model.">m_pParent</a>;
<a name="l00207"></a>00207       <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a5704c6a8a5e65c20b14d3f0e129b577c" title="Parent model, NULL if current model is the root model.">m_pParent</a>) { this-&gt;<a class="code" href="classqx_1_1_ix_model.html#af2980909d5a14d498195447bc8a0617e" title="Auto-update database on field change (detected by the setData() method)">m_eAutoUpdateDatabase</a> = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a5704c6a8a5e65c20b14d3f0e129b577c" title="Parent model, NULL if current model is the root model.">m_pParent</a>-&gt;<a class="code" href="classqx_1_1_ix_model.html#a473ea42fe79c418073e5452a69d25029">getAutoUpdateDatabase</a>(); }
<a name="l00208"></a>00208    }
<a name="l00209"></a>00209 
<a name="l00210"></a>00210 <span class="keyword">public</span>:
<a name="l00211"></a>00211 
<a name="l00212"></a><a class="code" href="classqx_1_1_qx_model.html#aa90fdd2a234ca292b76b5cda59fab826">00212</a>    <span class="keyword">virtual</span> QVariant <a class="code" href="classqx_1_1_qx_model.html#aa90fdd2a234ca292b76b5cda59fab826">data</a>(<span class="keyword">const</span> QModelIndex &amp; <a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>, <span class="keywordtype">int</span> role = Qt::DisplayRole)<span class="keyword"> const</span>
<a name="l00213"></a>00213 <span class="keyword">   </span>{
<a name="l00214"></a>00214       <span class="keywordflow">if</span> (! index.isValid()) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00215"></a>00215       <span class="keywordflow">if</span> ((role == Qt::DisplayRole) || (role == Qt::EditRole))
<a name="l00216"></a>00216       {
<a name="l00217"></a>00217          <span class="keywordflow">if</span> ((index.column() &lt; 0) || (index.column() &gt;= <a class="code" href="classqx_1_1_ix_model.html#a3f22f2b0fc0ad816433af8026db9d048" title="List of data member exposed by the model.">m_lstDataMember</a>.count())) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00218"></a>00218          <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((index.row() &lt; 0) || (index.row() &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00219"></a>00219          <a class="code" href="classqx_1_1_ix_data_member.html" title="qx::IxDataMember : common interface for all class properties registered into QxOrm context...">IxDataMember</a> * pDataMember = <a class="code" href="classqx_1_1_ix_model.html#a3f22f2b0fc0ad816433af8026db9d048" title="List of data member exposed by the model.">m_lstDataMember</a>.at(index.column());
<a name="l00220"></a>00220          <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(index.row());
<a name="l00221"></a>00221          <span class="keywordflow">if</span> (! pDataMember || ! pItem) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00222"></a>00222          <span class="keywordflow">return</span> pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#aeb41e750a0e5ae206fe671cb94c7eb0f">toVariant</a>(pItem.get());
<a name="l00223"></a>00223       }
<a name="l00224"></a>00224       <span class="keywordflow">else</span> <span class="keywordflow">if</span> (role &gt;= (Qt::UserRole + 1))
<a name="l00225"></a>00225       {
<a name="l00226"></a>00226          QModelIndex idx = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>(index.row(), (role - Qt::UserRole - 1), QModelIndex());
<a name="l00227"></a>00227          <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_qx_model.html#aa90fdd2a234ca292b76b5cda59fab826">data</a>(idx, Qt::DisplayRole);
<a name="l00228"></a>00228       }
<a name="l00229"></a>00229       <span class="keywordflow">return</span> QVariant();
<a name="l00230"></a>00230    }
<a name="l00231"></a>00231 
<a name="l00232"></a><a class="code" href="classqx_1_1_qx_model.html#a8941b0324ac03f964e790c3472dcecd6">00232</a>    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1_qx_model.html#a8941b0324ac03f964e790c3472dcecd6">setData</a>(<span class="keyword">const</span> QModelIndex &amp; <a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>, <span class="keyword">const</span> QVariant &amp; value, <span class="keywordtype">int</span> role = Qt::EditRole)
<a name="l00233"></a>00233    {
<a name="l00234"></a>00234       <span class="keywordflow">if</span> (! index.isValid()) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00235"></a>00235       <span class="keywordflow">if</span> (role == Qt::EditRole)
<a name="l00236"></a>00236       {
<a name="l00237"></a>00237          <span class="keywordflow">if</span> ((index.column() &lt; 0) || (index.column() &gt;= <a class="code" href="classqx_1_1_ix_model.html#a3f22f2b0fc0ad816433af8026db9d048" title="List of data member exposed by the model.">m_lstDataMember</a>.count())) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00238"></a>00238          <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((index.row() &lt; 0) || (index.row() &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00239"></a>00239          <a class="code" href="classqx_1_1_ix_data_member.html" title="qx::IxDataMember : common interface for all class properties registered into QxOrm context...">IxDataMember</a> * pDataMember = <a class="code" href="classqx_1_1_ix_model.html#a3f22f2b0fc0ad816433af8026db9d048" title="List of data member exposed by the model.">m_lstDataMember</a>.at(index.column());
<a name="l00240"></a>00240          <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(index.row());
<a name="l00241"></a>00241          <span class="keywordflow">if</span> (! pDataMember || ! pItem) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00242"></a>00242          QVariant vCurrentValue = pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#aeb41e750a0e5ae206fe671cb94c7eb0f">toVariant</a>(pItem.get());
<a name="l00243"></a>00243          <span class="keywordflow">if</span> (vCurrentValue == value) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00244"></a>00244          <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> bSetData = pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#ab745b2a043797eecfe769c3f51257a35">fromVariant</a>(pItem.get(), value);
<a name="l00245"></a>00245          <span class="keywordflow">if</span> (bSetData) { <a class="code" href="classqx_1_1_ix_model.html#a8627052e760774c91d519bffcbf14ee0">raiseEvent_dataChanged</a>(index, index); }
<a name="l00246"></a>00246          <span class="keywordflow">if</span> (bSetData &amp;&amp; (<a class="code" href="classqx_1_1_ix_model.html#af2980909d5a14d498195447bc8a0617e" title="Auto-update database on field change (detected by the setData() method)">m_eAutoUpdateDatabase</a> == <a class="code" href="classqx_1_1_ix_model.html#aba691df453d52a1c502df841ed0a0e66a60ec0e64ab5a0f0014b91e37c9ed27d0">qx::IxModel::e_auto_update_on_field_change</a>) &amp;&amp; <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>)
<a name="l00247"></a>00247          {
<a name="l00248"></a>00248             QVariant vId = <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#aeb41e750a0e5ae206fe671cb94c7eb0f">toVariant</a>(pItem.get());
<a name="l00249"></a>00249             <span class="keywordtype">bool</span> bExist = <a class="code" href="namespaceqx_1_1trait.html#a752ada47a935cfc82ffe1b17dadd6e72">qx::trait::is_valid_primary_key</a>(vId);
<a name="l00250"></a>00250             <span class="keywordflow">if</span> (bExist) { bExist = <a class="code" href="group___qx_cache.html#ga1b3b7fe7db7920493f40d0adb9c4957e" title="Return true if the cache contains an object associated with key sKey; otherwise return false...">qx::dao::exist</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(NULL)); }
<a name="l00251"></a>00251             <span class="keywordflow">if</span> (bExist) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::update</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(NULL), (QStringList() &lt;&lt; pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#aaf7b8145ed3e5a4708ff713951629744">getKey</a>())); }
<a name="l00252"></a>00252             <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995" title="Insert an element or a list of elements into database.">qx::dao::insert</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(NULL)); }
<a name="l00253"></a>00253          }
<a name="l00254"></a>00254          <span class="keywordflow">return</span> bSetData;
<a name="l00255"></a>00255       }
<a name="l00256"></a>00256       <span class="keywordflow">else</span> <span class="keywordflow">if</span> (role &gt;= (Qt::UserRole + 1))
<a name="l00257"></a>00257       {
<a name="l00258"></a>00258          QModelIndex idx = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>(index.row(), (role - Qt::UserRole - 1), QModelIndex());
<a name="l00259"></a>00259          <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_qx_model.html#a8941b0324ac03f964e790c3472dcecd6">setData</a>(idx, value, Qt::EditRole);
<a name="l00260"></a>00260       }
<a name="l00261"></a>00261       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00262"></a>00262    }
<a name="l00263"></a>00263 
<a name="l00264"></a><a class="code" href="classqx_1_1_qx_model.html#a0084426b5d4f8b15f0a0f0c34c78b3d9">00264</a>    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1_qx_model.html#a0084426b5d4f8b15f0a0f0c34c78b3d9">insertRows</a>(<span class="keywordtype">int</span> row, <span class="keywordtype">int</span> <a class="code" href="group___qx_cache.html#gace04518e9bf2dd2fca8449037ceffa19" title="Return the number of objects in the cache.">count</a>, <span class="keyword">const</span> QModelIndex &amp; <a class="code" href="classqx_1_1_ix_model.html#a5b6062f358ef8ffa0c9d11f2b677ca14">parent</a> = QModelIndex())
<a name="l00265"></a>00265    {
<a name="l00266"></a>00266       <span class="keywordflow">if</span> (<a class="code" href="classqx_1_1_ix_model.html#a5b6062f358ef8ffa0c9d11f2b677ca14">parent</a>.isValid()) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00267"></a>00267       <span class="keywordflow">if</span> ((row &lt; 0) || (count &lt;= 0)) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00268"></a>00268       beginInsertRows(QModelIndex(), row, (row + count - 1));
<a name="l00269"></a>00269       <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="group___qx_cache.html#gace04518e9bf2dd2fca8449037ceffa19" title="Return the number of objects in the cache.">count</a>; ++i)
<a name="l00270"></a>00270       {
<a name="l00271"></a>00271          <a class="code" href="classqx_1_1_qx_model.html#a2d1a76e9a19ad15e645dbd6605fa7f3f">type_primary_key</a> primaryKey;
<a name="l00272"></a>00272          <a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef" title="Index to insert manually items to the collection.">m_lManualInsertIndex</a> = (<a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef" title="Index to insert manually items to the collection.">m_lManualInsertIndex</a> - 1);
<a name="l00273"></a>00273          QVariant vNewId(static_cast&lt;qlonglong&gt;(<a class="code" href="classqx_1_1_qx_model.html#a37883f4d4971163c4e4b9c8cc7fb29ef" title="Index to insert manually items to the collection.">m_lManualInsertIndex</a>));
<a name="l00274"></a>00274          <a class="code" href="namespaceqx_1_1cvt.html#a38fbb18bd04613956f3900604f5746be">qx::cvt::from_variant</a>(vNewId, primaryKey);
<a name="l00275"></a>00275          <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a>(<span class="keyword">new</span> T());
<a name="l00276"></a>00276          <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#a0f4fa1d6008d5910103be9037f20665b" title="Add element &#39;value&#39; at the end of the list indexed by &#39;key&#39;.">insert</a>(row, primaryKey, pItem);
<a name="l00277"></a>00277       }
<a name="l00278"></a>00278       endInsertRows();
<a name="l00279"></a>00279       <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00280"></a>00280    }
<a name="l00281"></a>00281 
<a name="l00282"></a>00282 <span class="keyword">public</span>:
<a name="l00283"></a>00283 
<a name="l00289"></a><a class="code" href="classqx_1_1_qx_model.html#ab543c16cd10277f7c9c4231cf4857801">00289</a>    <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classqx_1_1_qx_model.html#ab543c16cd10277f7c9c4231cf4857801" title="Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm c...">qxCount</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query = <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>(), QSqlDatabase * pDatabase = NULL)
<a name="l00290"></a>00290    {
<a name="l00291"></a>00291       <span class="keywordflow">return</span> qx::dao::count&lt;T&gt;(query, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00292"></a>00292    }
<a name="l00293"></a>00293 
<a name="l00300"></a><a class="code" href="classqx_1_1_qx_model.html#ac62fc3913e4662c103db997c848afd1a">00300</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#ab543c16cd10277f7c9c4231cf4857801" title="Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm c...">qxCount</a>(<span class="keywordtype">long</span> &amp; lCount, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query = <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>(), QSqlDatabase * pDatabase = NULL)
<a name="l00301"></a>00301    {
<a name="l00302"></a>00302       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = qx::dao::count&lt;T&gt;(lCount, query, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00303"></a>00303       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00304"></a>00304    }
<a name="l00305"></a>00305 
<a name="l00313"></a><a class="code" href="classqx_1_1_qx_model.html#a6b29016768ce825825912d21f2791e4f">00313</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a6b29016768ce825825912d21f2791e4f" title="Clear the model and fetch an object (retrieve all its properties) of type T (registered into QxOrm co...">qxFetchById</a>(<span class="keyword">const</span> QVariant &amp; <span class="keywordtype">id</span>, <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00314"></a>00314    {
<a name="l00315"></a>00315       <a class="code" href="classqx_1_1_ix_model.html#a9dcc6de207be096a869911b4b4739414">clear</a>();
<a name="l00316"></a>00316       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a>(<span class="keyword">new</span> T());
<a name="l00317"></a>00317       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { qDebug(<span class="stringliteral">&quot;[QxOrm] problem with &#39;qxFetchById()&#39; method : &#39;%s&#39;&quot;</span>, <span class="stringliteral">&quot;data member id not registered&quot;</span>); <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(<span class="keyword">false</span>); }
<a name="l00318"></a>00318       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = QSqlError(<span class="stringliteral">&quot;[QxOrm] problem with &#39;qxFetchById()&#39; method : &#39;data member id not registered&#39;&quot;</span>, <span class="stringliteral">&quot;&quot;</span>, QSqlError::UnknownError); <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>; }
<a name="l00319"></a>00319       <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#ab745b2a043797eecfe769c3f51257a35">fromVariant</a>(pItem.get(), id);
<a name="l00320"></a>00320 
<a name="l00321"></a>00321       <a class="code" href="classqx_1_1_qx_model.html#a2d1a76e9a19ad15e645dbd6605fa7f3f">type_primary_key</a> primaryKey;
<a name="l00322"></a>00322       <a class="code" href="namespaceqx_1_1cvt.html#a38fbb18bd04613956f3900604f5746be">qx::cvt::from_variant</a>(<span class="keywordtype">id</span>, primaryKey);
<a name="l00323"></a>00323       beginInsertRows(QModelIndex(), 0, 0);
<a name="l00324"></a>00324       <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#a0f4fa1d6008d5910103be9037f20665b" title="Add element &#39;value&#39; at the end of the list indexed by &#39;key&#39;.">insert</a>(primaryKey, pItem);
<a name="l00325"></a>00325 
<a name="l00326"></a>00326       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga2abaf5f2e6de160b099cf2ab74967244" title="Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a...">qx::dao::fetch_by_id</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase), <a class="code" href="classqx_1_1_ix_model.html#aa232e4e69f86a81b984b8572699fb5e3" title="List of columns exposed by the model (if empty, all columns)">m_lstColumns</a>); }
<a name="l00327"></a>00327       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga37648a23475371e1b83ea2082265790d" title="Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a...">qx::dao::fetch_by_id_with_relation</a>(relation, (* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00328"></a>00328       endInsertRows();
<a name="l00329"></a>00329       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00330"></a>00330    }
<a name="l00331"></a>00331 
<a name="l00338"></a><a class="code" href="classqx_1_1_qx_model.html#a859860c6ada5c046f2f2d8fbdb5ebc60">00338</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a859860c6ada5c046f2f2d8fbdb5ebc60" title="Clear the model and fetch a list of objects (retrieve all elements and properties associated) of type...">qxFetchAll</a>(<span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00339"></a>00339    {
<a name="l00340"></a>00340       <a class="code" href="classqx_1_1_ix_model.html#a9dcc6de207be096a869911b4b4739414">clear</a>();
<a name="l00341"></a>00341       <a class="code" href="classqx_1_1_qx_collection.html">type_collection</a> tmp;
<a name="l00342"></a>00342       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#gab7a00918917a06ad703a8d6887b94edb" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">qx::dao::fetch_all</a>(tmp, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase), <a class="code" href="classqx_1_1_ix_model.html#aa232e4e69f86a81b984b8572699fb5e3" title="List of columns exposed by the model (if empty, all columns)">m_lstColumns</a>); }
<a name="l00343"></a>00343       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#gad4e90031bacdd06cf278ae3ccefa9811" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">qx::dao::fetch_all_with_relation</a>(relation, tmp, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00344"></a>00344 
<a name="l00345"></a>00345       <span class="keywordflow">if</span> (tmp.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>() &lt;= 0) { <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>; }
<a name="l00346"></a>00346       beginInsertRows(QModelIndex(), 0, (tmp.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>() - 1));
<a name="l00347"></a>00347       <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a> = tmp;
<a name="l00348"></a>00348       endInsertRows();
<a name="l00349"></a>00349       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00350"></a>00350    }
<a name="l00351"></a>00351 
<a name="l00359"></a><a class="code" href="classqx_1_1_qx_model.html#aee84c03d9c6e703224f7537bd96c9707">00359</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#aee84c03d9c6e703224f7537bd96c9707" title="Clear the model and fetch a list of objects (retrieve all elements and properties associated) of type...">qxFetchByQuery</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00360"></a>00360    {
<a name="l00361"></a>00361       <a class="code" href="classqx_1_1_ix_model.html#a9dcc6de207be096a869911b4b4739414">clear</a>();
<a name="l00362"></a>00362       <a class="code" href="classqx_1_1_qx_collection.html">type_collection</a> tmp;
<a name="l00363"></a>00363       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga98785915863d9487b0f3734b667a3c72" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">qx::dao::fetch_by_query</a>(query, tmp, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase), <a class="code" href="classqx_1_1_ix_model.html#aa232e4e69f86a81b984b8572699fb5e3" title="List of columns exposed by the model (if empty, all columns)">m_lstColumns</a>); }
<a name="l00364"></a>00364       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga2d8f0176ef1c7b675297637090c95129" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">qx::dao::fetch_by_query_with_relation</a>(relation, query, tmp, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00365"></a>00365 
<a name="l00366"></a>00366       <span class="keywordflow">if</span> (tmp.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>() &lt;= 0) { <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>; }
<a name="l00367"></a>00367       beginInsertRows(QModelIndex(), 0, (tmp.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>() - 1));
<a name="l00368"></a>00368       <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a> = tmp;
<a name="l00369"></a>00369       endInsertRows();
<a name="l00370"></a>00370       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00371"></a>00371    }
<a name="l00372"></a>00372 
<a name="l00380"></a><a class="code" href="classqx_1_1_qx_model.html#a92d80b8a5a9afa7b8d3389d1c8a5d35f">00380</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a92d80b8a5a9afa7b8d3389d1c8a5d35f" title="Get an item in the model at line row and fetch all its properties mapped to a table in the database...">qxFetchRow</a>(<span class="keywordtype">int</span> row, <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00381"></a>00381    {
<a name="l00382"></a>00382       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00383"></a>00383       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00384"></a>00384       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga2abaf5f2e6de160b099cf2ab74967244" title="Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a...">qx::dao::fetch_by_id</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase), <a class="code" href="classqx_1_1_ix_model.html#aa232e4e69f86a81b984b8572699fb5e3" title="List of columns exposed by the model (if empty, all columns)">m_lstColumns</a>); }
<a name="l00385"></a>00385       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga37648a23475371e1b83ea2082265790d" title="Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a...">qx::dao::fetch_by_id_with_relation</a>(relation, (* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00386"></a>00386       <span class="keywordflow">if</span> (<a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>.isValid()) { <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>; }
<a name="l00387"></a>00387 
<a name="l00388"></a>00388       QModelIndex idxTopLeft = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>(row, 0);
<a name="l00389"></a>00389       QModelIndex idxBottomRight = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>(row, (<a class="code" href="classqx_1_1_ix_model.html#a3f22f2b0fc0ad816433af8026db9d048" title="List of data member exposed by the model.">m_lstDataMember</a>.count() - 1));
<a name="l00390"></a>00390       this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a8627052e760774c91d519bffcbf14ee0">raiseEvent_dataChanged</a>(idxTopLeft, idxBottomRight);
<a name="l00391"></a>00391       this-&gt;<a class="code" href="classqx_1_1_qx_model.html#aa98a3e1c421a049b707d9c36b9f2df84">updateKey</a>(row);
<a name="l00392"></a>00392       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00393"></a>00393    }
<a name="l00394"></a>00394 
<a name="l00401"></a><a class="code" href="classqx_1_1_qx_model.html#a2c5e298517e16c9fc8b241fe77e9b27a">00401</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a2c5e298517e16c9fc8b241fe77e9b27a" title="Insert all items in the model into database.">qxInsert</a>(<span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00402"></a>00402    {
<a name="l00403"></a>00403       <span class="keywordflow">if</span> (relation.count() &gt; 0) { this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a8b2b46f3acd67d2ea4267257fd70f380">syncAllNestedModel</a>(relation); }
<a name="l00404"></a>00404       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995" title="Insert an element or a list of elements into database.">qx::dao::insert</a>(<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00405"></a>00405       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga82e03bc10e1fbdc3f58f1efac252f4bc" title="Insert an element and its relationships (or a list of elements + relationships) into database...">qx::dao::insert_with_relation</a>(relation, <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00406"></a>00406       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>.isValid()) { this-&gt;<a class="code" href="classqx_1_1_qx_model.html#a9d18f4b9e70c6f79a83c51b14786f011">updateAllKeys</a>(); }
<a name="l00407"></a>00407       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00408"></a>00408    }
<a name="l00409"></a>00409 
<a name="l00417"></a><a class="code" href="classqx_1_1_qx_model.html#a93b788ce05b2eed6acb163547d0a3176">00417</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a93b788ce05b2eed6acb163547d0a3176" title="Insert an item of the model at line row into database.">qxInsertRow</a>(<span class="keywordtype">int</span> row, <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00418"></a>00418    {
<a name="l00419"></a>00419       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00420"></a>00420       <span class="keywordflow">if</span> (relation.count() &gt; 0) { this-&gt;<a class="code" href="classqx_1_1_ix_model.html#aeb4e45ddd7008a92b7b96190d646667d">syncNestedModel</a>(row, relation); }
<a name="l00421"></a>00421       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00422"></a>00422       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995" title="Insert an element or a list of elements into database.">qx::dao::insert</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00423"></a>00423       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga82e03bc10e1fbdc3f58f1efac252f4bc" title="Insert an element and its relationships (or a list of elements + relationships) into database...">qx::dao::insert_with_relation</a>(relation, (* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00424"></a>00424       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>.isValid()) { this-&gt;<a class="code" href="classqx_1_1_qx_model.html#aa98a3e1c421a049b707d9c36b9f2df84">updateKey</a>(row); }
<a name="l00425"></a>00425       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00426"></a>00426    }
<a name="l00427"></a>00427 
<a name="l00435"></a><a class="code" href="classqx_1_1_qx_model.html#aca89226b12bea5293216506376e6ae79">00435</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#aca89226b12bea5293216506376e6ae79" title="Update all items in the model into database.">qxUpdate</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query = <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>(), <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00436"></a>00436    {
<a name="l00437"></a>00437       <span class="keywordflow">if</span> (relation.count() &gt; 0) { this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a8b2b46f3acd67d2ea4267257fd70f380">syncAllNestedModel</a>(relation); }
<a name="l00438"></a>00438       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga1bd1d32eccfb73ccd6a0e82130061fb4" title="Update an element or a list of elements into database (adding a user SQL query to the default SQL que...">qx::dao::update_by_query</a>(query, <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase), <a class="code" href="classqx_1_1_ix_model.html#aa232e4e69f86a81b984b8572699fb5e3" title="List of columns exposed by the model (if empty, all columns)">m_lstColumns</a>); }
<a name="l00439"></a>00439       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga9fb34aec7e865b97365c91ba20e422d2" title="Update an element and its relationships (or a list of elements + relationships) into database (adding...">qx::dao::update_by_query_with_relation</a>(relation, query, <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00440"></a>00440       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>.isValid()) { this-&gt;<a class="code" href="classqx_1_1_qx_model.html#a9d18f4b9e70c6f79a83c51b14786f011">updateAllKeys</a>(); }
<a name="l00441"></a>00441       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00442"></a>00442    }
<a name="l00443"></a>00443 
<a name="l00452"></a><a class="code" href="classqx_1_1_qx_model.html#ad4e848b1a9bc24cb724a9416fd1d76a0">00452</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#ad4e848b1a9bc24cb724a9416fd1d76a0" title="Update an item of the model at line row into database.">qxUpdateRow</a>(<span class="keywordtype">int</span> row, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query = <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>(), <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00453"></a>00453    {
<a name="l00454"></a>00454       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00455"></a>00455       <span class="keywordflow">if</span> (relation.count() &gt; 0) { this-&gt;<a class="code" href="classqx_1_1_ix_model.html#aeb4e45ddd7008a92b7b96190d646667d">syncNestedModel</a>(row, relation); }
<a name="l00456"></a>00456       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00457"></a>00457       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga1bd1d32eccfb73ccd6a0e82130061fb4" title="Update an element or a list of elements into database (adding a user SQL query to the default SQL que...">qx::dao::update_by_query</a>(query, (* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase), <a class="code" href="classqx_1_1_ix_model.html#aa232e4e69f86a81b984b8572699fb5e3" title="List of columns exposed by the model (if empty, all columns)">m_lstColumns</a>); }
<a name="l00458"></a>00458       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga9fb34aec7e865b97365c91ba20e422d2" title="Update an element and its relationships (or a list of elements + relationships) into database (adding...">qx::dao::update_by_query_with_relation</a>(relation, query, (* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00459"></a>00459       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>.isValid()) { this-&gt;<a class="code" href="classqx_1_1_qx_model.html#aa98a3e1c421a049b707d9c36b9f2df84">updateKey</a>(row); }
<a name="l00460"></a>00460       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00461"></a>00461    }
<a name="l00462"></a>00462 
<a name="l00469"></a><a class="code" href="classqx_1_1_qx_model.html#a996a650f41e2b871975cea5d1d5c10f5">00469</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a996a650f41e2b871975cea5d1d5c10f5" title="Save all items (insert or update) in the model into database.">qxSave</a>(<span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00470"></a>00470    {
<a name="l00471"></a>00471       <span class="keywordflow">if</span> (relation.count() &gt; 0) { this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a8b2b46f3acd67d2ea4267257fd70f380">syncAllNestedModel</a>(relation); }
<a name="l00472"></a>00472       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">qx::dao::save</a>(<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00473"></a>00473       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga653fbb3a886e48bca4236ea3fe6ac865" title="Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elem...">qx::dao::save_with_relation</a>(relation, <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00474"></a>00474       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>.isValid()) { this-&gt;<a class="code" href="classqx_1_1_qx_model.html#a9d18f4b9e70c6f79a83c51b14786f011">updateAllKeys</a>(); }
<a name="l00475"></a>00475       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00476"></a>00476    }
<a name="l00477"></a>00477 
<a name="l00485"></a><a class="code" href="classqx_1_1_qx_model.html#a6c2d4497957d25bacebd440047d3ba59">00485</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a6c2d4497957d25bacebd440047d3ba59" title="Save an item of the model at line row into database.">qxSaveRow</a>(<span class="keywordtype">int</span> row, <span class="keyword">const</span> QStringList &amp; relation = QStringList(), QSqlDatabase * pDatabase = NULL)
<a name="l00486"></a>00486    {
<a name="l00487"></a>00487       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00488"></a>00488       <span class="keywordflow">if</span> (relation.count() &gt; 0) { this-&gt;<a class="code" href="classqx_1_1_ix_model.html#aeb4e45ddd7008a92b7b96190d646667d">syncNestedModel</a>(row, relation); }
<a name="l00489"></a>00489       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00490"></a>00490       <span class="keywordflow">if</span> (relation.count() == 0) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">qx::dao::save</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00491"></a>00491       <span class="keywordflow">else</span> { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga653fbb3a886e48bca4236ea3fe6ac865" title="Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elem...">qx::dao::save_with_relation</a>(relation, (* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase)); }
<a name="l00492"></a>00492       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>.isValid()) { this-&gt;<a class="code" href="classqx_1_1_qx_model.html#aa98a3e1c421a049b707d9c36b9f2df84">updateKey</a>(row); }
<a name="l00493"></a>00493       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00494"></a>00494    }
<a name="l00495"></a>00495 
<a name="l00502"></a><a class="code" href="classqx_1_1_qx_model.html#ad2ea10ec9cd2b43f1ef9e1d0e324e564">00502</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#ad2ea10ec9cd2b43f1ef9e1d0e324e564" title="Delete a line of a table (database) mapped to a C++ object of type T (registered into QxOrm context)...">qxDeleteById</a>(<span class="keyword">const</span> QVariant &amp; <span class="keywordtype">id</span>, QSqlDatabase * pDatabase = NULL)
<a name="l00503"></a>00503    {
<a name="l00504"></a>00504       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a>(<span class="keyword">new</span> T());
<a name="l00505"></a>00505       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { qDebug(<span class="stringliteral">&quot;[QxOrm] problem with &#39;qxDeleteById()&#39; method : &#39;%s&#39;&quot;</span>, <span class="stringliteral">&quot;data member id not registered&quot;</span>); <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(<span class="keyword">false</span>); }
<a name="l00506"></a>00506       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = QSqlError(<span class="stringliteral">&quot;[QxOrm] problem with &#39;qxDeleteById()&#39; method : &#39;data member id not registered&#39;&quot;</span>, <span class="stringliteral">&quot;&quot;</span>, QSqlError::UnknownError); <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>; }
<a name="l00507"></a>00507       <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#ab745b2a043797eecfe769c3f51257a35">fromVariant</a>(pItem.get(), id);
<a name="l00508"></a>00508       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga298e15a5e745ae43d99de9b4279aca3e" title="Delete a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered i...">qx::dao::delete_by_id</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00509"></a>00509       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00510"></a>00510    }
<a name="l00511"></a>00511 
<a name="l00517"></a><a class="code" href="classqx_1_1_qx_model.html#a011b3409d8acc14a074629cf024f0ca3">00517</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a011b3409d8acc14a074629cf024f0ca3" title="Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context)...">qxDeleteAll</a>(QSqlDatabase * pDatabase = NULL)
<a name="l00518"></a>00518    {
<a name="l00519"></a>00519       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = qx::dao::delete_all&lt;T&gt;(<a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00520"></a>00520       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00521"></a>00521    }
<a name="l00522"></a>00522 
<a name="l00529"></a><a class="code" href="classqx_1_1_qx_model.html#a87b34ae02a5ef623534230c2cb82ec87">00529</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a87b34ae02a5ef623534230c2cb82ec87" title="Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and fi...">qxDeleteByQuery</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL)
<a name="l00530"></a>00530    {
<a name="l00531"></a>00531       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = qx::dao::delete_by_query&lt;T&gt;(query, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00532"></a>00532       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00533"></a>00533    }
<a name="l00534"></a>00534 
<a name="l00541"></a><a class="code" href="classqx_1_1_qx_model.html#a5650b97f0190a6a044e95185f7f329c6">00541</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a5650b97f0190a6a044e95185f7f329c6" title="Delete in database the item at line row in the model, if no error occurred then you should remove row...">qxDeleteRow</a>(<span class="keywordtype">int</span> row, QSqlDatabase * pDatabase = NULL)
<a name="l00542"></a>00542    {
<a name="l00543"></a>00543       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00544"></a>00544       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00545"></a>00545       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga298e15a5e745ae43d99de9b4279aca3e" title="Delete a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered i...">qx::dao::delete_by_id</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00546"></a>00546       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00547"></a>00547    }
<a name="l00548"></a>00548 
<a name="l00555"></a><a class="code" href="classqx_1_1_qx_model.html#a4e8d847120cab3c823d97253daa9cabf">00555</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a4e8d847120cab3c823d97253daa9cabf" title="Delete a line of a table (even if a logical delete is defined) mapped to a C++ object of type T (regi...">qxDestroyById</a>(<span class="keyword">const</span> QVariant &amp; <span class="keywordtype">id</span>, QSqlDatabase * pDatabase = NULL)
<a name="l00556"></a>00556    {
<a name="l00557"></a>00557       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a>(<span class="keyword">new</span> T());
<a name="l00558"></a>00558       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { qDebug(<span class="stringliteral">&quot;[QxOrm] problem with &#39;qxDeleteById()&#39; method : &#39;%s&#39;&quot;</span>, <span class="stringliteral">&quot;data member id not registered&quot;</span>); <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(<span class="keyword">false</span>); }
<a name="l00559"></a>00559       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = QSqlError(<span class="stringliteral">&quot;[QxOrm] problem with &#39;qxDeleteById()&#39; method : &#39;data member id not registered&#39;&quot;</span>, <span class="stringliteral">&quot;&quot;</span>, QSqlError::UnknownError); <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>; }
<a name="l00560"></a>00560       <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#ab745b2a043797eecfe769c3f51257a35">fromVariant</a>(pItem.get(), id);
<a name="l00561"></a>00561       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga776e2edd2da36029cddc13e9e6e366f5" title="Destroy a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered ...">qx::dao::destroy_by_id</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00562"></a>00562       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00563"></a>00563    }
<a name="l00564"></a>00564 
<a name="l00570"></a><a class="code" href="classqx_1_1_qx_model.html#a3461b11d9fd96e205613edeaeba069e7">00570</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a3461b11d9fd96e205613edeaeba069e7" title="Delete all lines of a table (even if a logical delete is defined) mapped to a C++ class T (registered...">qxDestroyAll</a>(QSqlDatabase * pDatabase = NULL)
<a name="l00571"></a>00571    {
<a name="l00572"></a>00572       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = qx::dao::destroy_all&lt;T&gt;(<a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00573"></a>00573       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00574"></a>00574    }
<a name="l00575"></a>00575 
<a name="l00582"></a><a class="code" href="classqx_1_1_qx_model.html#ab23d15ff34b124f383960d8948285877">00582</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#ab23d15ff34b124f383960d8948285877" title="Delete all lines of a table (even if a logical delete is defined) mapped to a C++ class T (registered...">qxDestroyByQuery</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL)
<a name="l00583"></a>00583    {
<a name="l00584"></a>00584       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = qx::dao::destroy_by_query&lt;T&gt;(query, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00585"></a>00585       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00586"></a>00586    }
<a name="l00587"></a>00587 
<a name="l00594"></a><a class="code" href="classqx_1_1_qx_model.html#a4b533b2f1f8634db23101e7a21d7ea06">00594</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#a4b533b2f1f8634db23101e7a21d7ea06" title="Delete in database (even if a logical delete is defined) the item at line row in the model...">qxDestroyRow</a>(<span class="keywordtype">int</span> row, QSqlDatabase * pDatabase = NULL)
<a name="l00595"></a>00595    {
<a name="l00596"></a>00596       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00597"></a>00597       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> QSqlError(); }
<a name="l00598"></a>00598       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga776e2edd2da36029cddc13e9e6e366f5" title="Destroy a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered ...">qx::dao::destroy_by_id</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00599"></a>00599       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00600"></a>00600    }
<a name="l00601"></a>00601 
<a name="l00602"></a><a class="code" href="classqx_1_1_qx_model.html#ab11ea058c052afca523b3a49eaeb75ea">00602</a>    <span class="keyword">virtual</span> QSqlError <a class="code" href="classqx_1_1_qx_model.html#ab11ea058c052afca523b3a49eaeb75ea">qxExecuteQuery</a>(<a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL)
<a name="l00603"></a>00603    {
<a name="l00604"></a>00604       <a class="code" href="classqx_1_1_ix_model.html#a9dcc6de207be096a869911b4b4739414">clear</a>();
<a name="l00605"></a>00605       <a class="code" href="classqx_1_1_qx_collection.html">type_collection</a> tmp;
<a name="l00606"></a>00606       <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a> = <a class="code" href="group___qx_dao.html#ga095032025fbf7aee88da96479203a077" title="Execute a custom SQL query or a stored procedure, all columns that can be mapped to the instance of t...">qx::dao::execute_query</a>(query, tmp, <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00607"></a>00607 
<a name="l00608"></a>00608       <span class="keywordflow">if</span> (tmp.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>() &lt;= 0) { <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>; }
<a name="l00609"></a>00609       beginInsertRows(QModelIndex(), 0, (tmp.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>() - 1));
<a name="l00610"></a>00610       <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a> = tmp;
<a name="l00611"></a>00611       endInsertRows();
<a name="l00612"></a>00612       <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_ix_model.html#a5783fb8b325f7e84df2b1f19346c4cd8" title="Last SQL error.">m_lastError</a>;
<a name="l00613"></a>00613    }
<a name="l00614"></a>00614 
<a name="l00615"></a><a class="code" href="classqx_1_1_qx_model.html#a500a9bb91d16b10af29419d738e398b9">00615</a>    <span class="keyword">virtual</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="classqx_1_1_qx_model.html#a500a9bb91d16b10af29419d738e398b9">qxExist</a>(<span class="keyword">const</span> QVariant &amp; <span class="keywordtype">id</span>, QSqlDatabase * pDatabase = NULL)
<a name="l00616"></a>00616    {
<a name="l00617"></a>00617       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a>(<span class="keyword">new</span> T());
<a name="l00618"></a>00618       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { qDebug(<span class="stringliteral">&quot;[QxOrm] problem with &#39;qxExist()&#39; method : &#39;%s&#39;&quot;</span>, <span class="stringliteral">&quot;data member id not registered&quot;</span>); <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(<span class="keyword">false</span>); }
<a name="l00619"></a>00619       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { <span class="keywordflow">return</span> <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">false</span>); }
<a name="l00620"></a>00620       <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#ab745b2a043797eecfe769c3f51257a35">fromVariant</a>(pItem.get(), id);
<a name="l00621"></a>00621       <span class="keywordflow">return</span> <a class="code" href="group___qx_cache.html#ga1b3b7fe7db7920493f40d0adb9c4957e" title="Return true if the cache contains an object associated with key sKey; otherwise return false...">qx::dao::exist</a>((* pItem), <a class="code" href="classqx_1_1_ix_model.html#a8a42db3094b57193f2818843e1830aa6">database</a>(pDatabase));
<a name="l00622"></a>00622    }
<a name="l00623"></a>00623 
<a name="l00624"></a><a class="code" href="classqx_1_1_qx_model.html#a7279b0e10759bb15a2eb7eea039cf6b0">00624</a>    <span class="keyword">virtual</span> <a class="code" href="classqx_1_1_qx_invalid_value_x.html" title="qx::QxInvalidValueX : list of invalid values">qx::QxInvalidValueX</a> <a class="code" href="classqx_1_1_qx_model.html#a7279b0e10759bb15a2eb7eea039cf6b0">qxValidate</a>(<span class="keyword">const</span> QStringList &amp; groups = QStringList())
<a name="l00625"></a>00625    {
<a name="l00626"></a>00626       <span class="keywordflow">return</span> <a class="code" href="namespaceqx.html#a09e063c1129e1035ba6ca7899ff821a4">qx::validate</a>(<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>, groups);
<a name="l00627"></a>00627    }
<a name="l00628"></a>00628 
<a name="l00629"></a><a class="code" href="classqx_1_1_qx_model.html#a07b99c4460be4408413166b06492ef3d">00629</a>    <span class="keyword">virtual</span> <a class="code" href="classqx_1_1_qx_invalid_value_x.html" title="qx::QxInvalidValueX : list of invalid values">qx::QxInvalidValueX</a> <a class="code" href="classqx_1_1_qx_model.html#a07b99c4460be4408413166b06492ef3d">qxValidateRow</a>(<span class="keywordtype">int</span> row, <span class="keyword">const</span> QStringList &amp; groups = QStringList())
<a name="l00630"></a>00630    {
<a name="l00631"></a>00631       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_qx_invalid_value_x.html" title="qx::QxInvalidValueX : list of invalid values">qx::QxInvalidValueX</a>(); }
<a name="l00632"></a>00632       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> <a class="code" href="classqx_1_1_qx_invalid_value_x.html" title="qx::QxInvalidValueX : list of invalid values">qx::QxInvalidValueX</a>(); }
<a name="l00633"></a>00633       <span class="keywordflow">return</span> <a class="code" href="namespaceqx.html#a09e063c1129e1035ba6ca7899ff821a4">qx::validate</a>((* pItem), groups);
<a name="l00634"></a>00634    }
<a name="l00635"></a>00635 
<a name="l00636"></a>00636 <span class="keyword">protected</span>:
<a name="l00637"></a>00637 
<a name="l00638"></a><a class="code" href="classqx_1_1_qx_model.html#a204ff9dad3bb5a4e6c69220c630898c6">00638</a>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classqx_1_1_qx_model.html#a204ff9dad3bb5a4e6c69220c630898c6">dumpModelImpl</a>(<span class="keywordtype">bool</span> bJsonFormat)<span class="keyword"> const </span>{ <a class="code" href="group___qx_serialize.html#gabbe9730199da31c65dd8ced667b99e23" title="qx::dump(const T &amp; t, bool bJsonFormat) : dump class of type T registered into QxOrm context using XM...">qx::dump</a>(<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>, bJsonFormat); }
<a name="l00639"></a>00639 
<a name="l00640"></a><a class="code" href="classqx_1_1_qx_model.html#a5257abdaa73a20704942e4d70722a66a">00640</a>    <span class="keyword">virtual</span> QObject * <a class="code" href="classqx_1_1_qx_model.html#a5257abdaa73a20704942e4d70722a66a">cloneModelImpl</a>()
<a name="l00641"></a>00641    {
<a name="l00642"></a>00642       <a class="code" href="classqx_1_1_qx_model.html" title="qx::QxModel&lt;T&gt; : all classes registered into QxOrm context can be used with Qt model/view architectur...">qx::QxModel&lt;T&gt;</a> * pClone = <span class="keyword">new</span> <a class="code" href="classqx_1_1_qx_model.html" title="qx::QxModel&lt;T&gt; : all classes registered into QxOrm context can be used with Qt model/view architectur...">qx::QxModel&lt;T&gt;</a>(<span class="keyword">this</span>, NULL);
<a name="l00643"></a>00643       qx_shared_ptr&lt;type_collection&gt; pModel = <a class="code" href="group___qx_serialize.html#ga80162fe005f1f828a4589defaca4402f" title="qx::clone(const T &amp; obj) : return a boost smart-pointer (qx_shared_ptr&lt;T&gt;) of a new instance of type ...">qx::clone</a>(pClone-&gt;<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>);
<a name="l00644"></a>00644       <span class="keywordflow">if</span> (pModel) { pClone-&gt;<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a> = (* pModel); }
<a name="l00645"></a>00645       <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>QObject *<span class="keyword">&gt;</span>(pClone);
<a name="l00646"></a>00646    }
<a name="l00647"></a>00647 
<a name="l00648"></a><a class="code" href="classqx_1_1_qx_model.html#aa98a3e1c421a049b707d9c36b9f2df84">00648</a>    <span class="keywordtype">void</span> <a class="code" href="classqx_1_1_qx_model.html#aa98a3e1c421a049b707d9c36b9f2df84">updateKey</a>(<span class="keywordtype">int</span> row)
<a name="l00649"></a>00649    {
<a name="l00650"></a>00650       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span>; }
<a name="l00651"></a>00651       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem || ! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>) { <span class="keywordflow">return</span>; }
<a name="l00652"></a>00652       <a class="code" href="classqx_1_1_qx_model.html#a2d1a76e9a19ad15e645dbd6605fa7f3f">type_primary_key</a> currPrimaryKey = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#a416faccd5e60a423a3d594eef2a3f99c" title="Return the key associated with the element at index position &#39;index&#39;.">getKeyByIndex</a>(row);
<a name="l00653"></a>00653       QVariant vCurrPrimaryKey = <a class="code" href="namespaceqx_1_1cvt.html#a54d0380e07b395f2d7d5c8eb3791f307">qx::cvt::to_variant</a>(currPrimaryKey);
<a name="l00654"></a>00654       QVariant vNextPrimaryKey = <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#aeb41e750a0e5ae206fe671cb94c7eb0f">toVariant</a>(pItem.get());
<a name="l00655"></a>00655       <span class="keywordflow">if</span> ((vCurrPrimaryKey == vNextPrimaryKey) || (! vNextPrimaryKey.isValid())) { <span class="keywordflow">return</span>; }
<a name="l00656"></a>00656       <span class="keywordflow">if</span> (! <a class="code" href="namespaceqx_1_1trait.html#a752ada47a935cfc82ffe1b17dadd6e72">qx::trait::is_valid_primary_key</a>(vNextPrimaryKey)) { <span class="keywordflow">return</span>; }
<a name="l00657"></a>00657       <a class="code" href="classqx_1_1_qx_model.html#a2d1a76e9a19ad15e645dbd6605fa7f3f">type_primary_key</a> updatedPrimaryKey;
<a name="l00658"></a>00658       <a class="code" href="namespaceqx_1_1cvt.html#a38fbb18bd04613956f3900604f5746be">qx::cvt::from_variant</a>(vNextPrimaryKey, updatedPrimaryKey);
<a name="l00659"></a>00659       <span class="keywordflow">if</span> (<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#a276ed91a7453196b87d027f91ef7ff21" title="Return &#39;true&#39; if the list contains an occurrence of &#39;key&#39;, otherwise return &#39;false&#39; (same as &#39;contain...">exist</a>(updatedPrimaryKey)) { <span class="keywordflow">return</span>; }
<a name="l00660"></a>00660       <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ad4d8541e983e15c660d7162bf502e9df" title="Remove the item at index position &#39;index&#39;.">removeByIndex</a>(row);
<a name="l00661"></a>00661       <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#a0f4fa1d6008d5910103be9037f20665b" title="Add element &#39;value&#39; at the end of the list indexed by &#39;key&#39;.">insert</a>(row, updatedPrimaryKey, pItem);
<a name="l00662"></a>00662    }
<a name="l00663"></a>00663 
<a name="l00664"></a><a class="code" href="classqx_1_1_qx_model.html#a9d18f4b9e70c6f79a83c51b14786f011">00664</a>    <span class="keywordtype">void</span> <a class="code" href="classqx_1_1_qx_model.html#a9d18f4b9e70c6f79a83c51b14786f011">updateAllKeys</a>()
<a name="l00665"></a>00665    {
<a name="l00666"></a>00666       <span class="keywordflow">for</span> (<span class="keywordtype">long</span> l = 0; l &lt; <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>(); l++)
<a name="l00667"></a>00667       { this-&gt;<a class="code" href="classqx_1_1_qx_model.html#aa98a3e1c421a049b707d9c36b9f2df84">updateKey</a>(l); }
<a name="l00668"></a>00668    }
<a name="l00669"></a>00669 
<a name="l00670"></a>00670 <span class="keyword">protected</span>:
<a name="l00671"></a>00671 
<a name="l00672"></a>00672 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00673"></a>00673 <span class="preprocessor"></span>
<a name="l00674"></a><a class="code" href="classqx_1_1_qx_model.html#a647c47ee31f30906b1a99cd112237721">00674</a>    <span class="keyword">virtual</span> QString <a class="code" href="classqx_1_1_qx_model.html#a647c47ee31f30906b1a99cd112237721">toJson_Helper</a>(<span class="keywordtype">int</span> row)<span class="keyword"> const</span>
<a name="l00675"></a>00675 <span class="keyword">   </span>{
<a name="l00676"></a>00676       <span class="keywordflow">if</span> (row == -1) { <span class="keywordflow">return</span> <a class="code" href="namespaceqx_1_1cvt.html#a7411faf9b027f9f4cfbd8018c8df6b6e">qx::serialization::json::to_string</a>(<a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>); }
<a name="l00677"></a>00677       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QString(); }
<a name="l00678"></a>00678       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> QString(); }
<a name="l00679"></a>00679       <span class="keywordflow">return</span> <a class="code" href="namespaceqx_1_1cvt.html#a7411faf9b027f9f4cfbd8018c8df6b6e">qx::serialization::json::to_string</a>(* pItem);
<a name="l00680"></a>00680    }
<a name="l00681"></a>00681 
<a name="l00682"></a><a class="code" href="classqx_1_1_qx_model.html#a053fb8de93fe00ff8f12e4b179da32b6">00682</a>    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1_qx_model.html#a053fb8de93fe00ff8f12e4b179da32b6">fromJson_Helper</a>(<span class="keyword">const</span> QString &amp; json, <span class="keywordtype">int</span> row)
<a name="l00683"></a>00683    {
<a name="l00684"></a>00684       <span class="keywordflow">if</span> (row == -1)
<a name="l00685"></a>00685       {
<a name="l00686"></a>00686          <a class="code" href="classqx_1_1_ix_model.html#a9dcc6de207be096a869911b4b4739414">clear</a>();
<a name="l00687"></a>00687          <a class="code" href="classqx_1_1_qx_collection.html">type_collection</a> tmp;
<a name="l00688"></a>00688          <span class="keywordflow">if</span> (! <a class="code" href="namespaceqx_1_1serialization_1_1json.html#a0f6759fcc33673f25ef5b6f4dc7fcc76">qx::serialization::json::from_string</a>(tmp, json)) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00689"></a>00689          beginInsertRows(QModelIndex(), 0, (tmp.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>() - 1));
<a name="l00690"></a>00690          <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a> = tmp;
<a name="l00691"></a>00691          endInsertRows();
<a name="l00692"></a>00692          <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00693"></a>00693       }
<a name="l00694"></a>00694 
<a name="l00695"></a>00695       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00696"></a>00696       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00697"></a>00697       <span class="keywordflow">if</span> (! <a class="code" href="namespaceqx_1_1serialization_1_1json.html#a0f6759fcc33673f25ef5b6f4dc7fcc76">qx::serialization::json::from_string</a>((* pItem), json)) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00698"></a>00698 
<a name="l00699"></a>00699       QModelIndex idxTopLeft = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>(row, 0);
<a name="l00700"></a>00700       QModelIndex idxBottomRight = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>(row, (<a class="code" href="classqx_1_1_ix_model.html#a3f22f2b0fc0ad816433af8026db9d048" title="List of data member exposed by the model.">m_lstDataMember</a>.count() - 1));
<a name="l00701"></a>00701       this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a8627052e760774c91d519bffcbf14ee0">raiseEvent_dataChanged</a>(idxTopLeft, idxBottomRight);
<a name="l00702"></a>00702       this-&gt;<a class="code" href="classqx_1_1_qx_model.html#aa98a3e1c421a049b707d9c36b9f2df84">updateKey</a>(row);
<a name="l00703"></a>00703       <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00704"></a>00704    }
<a name="l00705"></a>00705 
<a name="l00706"></a><a class="code" href="classqx_1_1_qx_model.html#a1147896b5ae49b7df7bdcf0db903728d">00706</a>    <span class="keyword">virtual</span> QVariant <a class="code" href="classqx_1_1_qx_model.html#a1147896b5ae49b7df7bdcf0db903728d">getRelationshipValues_Helper</a>(<span class="keywordtype">int</span> row, <span class="keyword">const</span> QString &amp; relation, <span class="keywordtype">bool</span> bLoadFromDatabase, <span class="keyword">const</span> QString &amp; sAppendRelations)
<a name="l00707"></a>00707    {
<a name="l00708"></a>00708       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00709"></a>00709       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a> || ! <a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a> || ! <a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#a8b897ee35ed11dc58762e36b2fcbaf7c">exist</a>(relation)) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00710"></a>00710       <a class="code" href="classqx_1_1_ix_data_member.html" title="qx::IxDataMember : common interface for all class properties registered into QxOrm context...">IxDataMember</a> * pDataMember = <a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#a85c9ce031745f0ec8ffa9ec786d9185d">get_WithDaoStrategy</a>(relation); <span class="keywordflow">if</span> (! pDataMember) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00711"></a>00711       <a class="code" href="classqx_1_1_ix_sql_relation.html" title="qx::IxSqlRelation : common interface for all relationships defined between 2 classes (or between 2 ta...">IxSqlRelation</a> * pRelation = (pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#abcfa16c3cc3ae21faa0a686c18c84f57">hasSqlRelation</a>() ? pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#a6300fd163bce788f01ab70284d48230a">getSqlRelation</a>() : NULL); <span class="keywordflow">if</span> (! pRelation) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00712"></a>00712       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00713"></a>00713       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItemTemp = pItem;
<a name="l00714"></a>00714 
<a name="l00715"></a>00715       <span class="keywordflow">if</span> (bLoadFromDatabase)
<a name="l00716"></a>00716       {
<a name="l00717"></a>00717          QString sRelation = relation;
<a name="l00718"></a>00718          <span class="keywordflow">if</span> (! sAppendRelations.isEmpty() &amp;&amp; ! sAppendRelations.startsWith(<span class="stringliteral">&quot;-&gt;&quot;</span>) &amp;&amp; ! sAppendRelations.startsWith(<span class="stringliteral">&quot;&gt;&gt;&quot;</span>)) { sRelation += <span class="stringliteral">&quot;-&gt;&quot;</span> + sAppendRelations; }
<a name="l00719"></a>00719          <span class="keywordflow">else</span> <span class="keywordflow">if</span> (! sAppendRelations.isEmpty()) { sRelation += sAppendRelations; }
<a name="l00720"></a>00720          pItemTemp = <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a>(<span class="keyword">new</span> T());
<a name="l00721"></a>00721          QVariant <span class="keywordtype">id</span> = <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#aeb41e750a0e5ae206fe671cb94c7eb0f">toVariant</a>(pItem.get());
<a name="l00722"></a>00722          <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#ab745b2a043797eecfe769c3f51257a35">fromVariant</a>(pItemTemp.get(), id);
<a name="l00723"></a>00723          QSqlError daoError = <a class="code" href="group___qx_dao.html#ga37648a23475371e1b83ea2082265790d" title="Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a...">qx::dao::fetch_by_id_with_relation</a>(sRelation, (* pItemTemp));
<a name="l00724"></a>00724          <span class="keywordflow">if</span> (daoError.isValid()) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00725"></a>00725       }
<a name="l00726"></a>00726 
<a name="l00727"></a>00727       QJsonValue json = pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#a6d0a637cfb402963a06177729a2cdc50">toJson</a>(pItemTemp.get()); <span class="keywordflow">if</span> (json.isNull()) { <span class="keywordflow">return</span> QVariant(); }
<a name="l00728"></a>00728       <span class="keywordflow">if</span> (json.isArray()) { <span class="keywordflow">return</span> json.toArray().toVariantList(); }
<a name="l00729"></a>00729       <span class="keywordflow">return</span> json.toObject().toVariantMap();
<a name="l00730"></a>00730    }
<a name="l00731"></a>00731 
<a name="l00732"></a><a class="code" href="classqx_1_1_qx_model.html#a4592d7e6530ce4b79330e2cde703bcb3">00732</a>    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1_qx_model.html#a4592d7e6530ce4b79330e2cde703bcb3">setRelationshipValues_Helper</a>(<span class="keywordtype">int</span> row, <span class="keyword">const</span> QString &amp; relation, <span class="keyword">const</span> QVariant &amp; values)
<a name="l00733"></a>00733    {
<a name="l00734"></a>00734       <span class="keywordflow">if</span> ((row &lt; 0) || (row &gt;= <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab8f0528865494102febab56031988a9a" title="Return the number of items in the list (same as &#39;size()&#39;)">count</a>())) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00735"></a>00735       <span class="keywordflow">if</span> ((values.type() != QVariant::List) &amp;&amp; (values.type() != QVariant::Map)) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00736"></a>00736       <span class="keywordflow">if</span> (! <a class="code" href="classqx_1_1_ix_model.html#ade76aa8736c82f2d43e09d38f0b9f933" title="Primary key (property id) defined into QxOrm context.">m_pDataMemberId</a> || ! <a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a> || ! <a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#a8b897ee35ed11dc58762e36b2fcbaf7c">exist</a>(relation)) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00737"></a>00737       <a class="code" href="classqx_1_1_ix_data_member.html" title="qx::IxDataMember : common interface for all class properties registered into QxOrm context...">IxDataMember</a> * pDataMember = <a class="code" href="classqx_1_1_ix_model.html#a6c5d8059723c2f7ff3ef15f431f03d0b" title="List of properties defined into QxOrm context.">m_pDataMemberX</a>-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#a85c9ce031745f0ec8ffa9ec786d9185d">get_WithDaoStrategy</a>(relation); <span class="keywordflow">if</span> (! pDataMember) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00738"></a>00738       <a class="code" href="classqx_1_1_ix_sql_relation.html" title="qx::IxSqlRelation : common interface for all relationships defined between 2 classes (or between 2 ta...">IxSqlRelation</a> * pRelation = (pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#abcfa16c3cc3ae21faa0a686c18c84f57">hasSqlRelation</a>() ? pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#a6300fd163bce788f01ab70284d48230a">getSqlRelation</a>() : NULL); <span class="keywordflow">if</span> (! pRelation) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00739"></a>00739       <a class="code" href="classqx_1_1_qx_model.html#aef823670a8fc66b5d0c8d887034b45a6">type_ptr</a> pItem = <a class="code" href="classqx_1_1_qx_model.html#af224b3a787360a263078e2d3c0ea843a" title="Model associated to a class registered into QxOrm context.">m_model</a>.<a class="code" href="classqx_1_1_qx_collection.html#ab20d863744dee2eac0752757e027e8be" title="Return the item at index position &#39;index&#39;.">getByIndex</a>(row); <span class="keywordflow">if</span> (! pItem) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00740"></a>00740 
<a name="l00741"></a>00741       QJsonValue json;
<a name="l00742"></a>00742       <span class="keywordflow">if</span> (values.type() == QVariant::List) { json = QJsonArray::fromVariantList(values.toList()); }
<a name="l00743"></a>00743       <span class="keywordflow">else</span> <span class="keywordflow">if</span> (values.type() == QVariant::Map) { json = QJsonObject::fromVariantMap(values.toMap()); }
<a name="l00744"></a>00744       <span class="keywordflow">if</span> (! pDataMember-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#a10480882fc70363db63c8d47942fe6a3">fromJson</a>(pItem.get(), json)) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00745"></a>00745 
<a name="l00746"></a>00746       QModelIndex idxTopLeft = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>(row, 0);
<a name="l00747"></a>00747       QModelIndex idxBottomRight = this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a4b4dc018bbb117a834715e6ba8a19b0f">index</a>(row, (<a class="code" href="classqx_1_1_ix_model.html#a3f22f2b0fc0ad816433af8026db9d048" title="List of data member exposed by the model.">m_lstDataMember</a>.count() - 1));
<a name="l00748"></a>00748       this-&gt;<a class="code" href="classqx_1_1_ix_model.html#a8627052e760774c91d519bffcbf14ee0">raiseEvent_dataChanged</a>(idxTopLeft, idxBottomRight);
<a name="l00749"></a>00749       <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00750"></a>00750    }
<a name="l00751"></a>00751 
<a name="l00752"></a>00752 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00753"></a>00753 <span class="preprocessor"></span>
<a name="l00754"></a>00754 };
<a name="l00755"></a>00755 
<a name="l00756"></a>00756 } <span class="comment">// namespace qx</span>
<a name="l00757"></a>00757 
<a name="l00758"></a>00758 <span class="preprocessor">#endif // _QX_MODEL_H_</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_qx_model_8h.html">QxModel.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Dec 11 2016 13:41:04 for QxOrm by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
